<?php

namespace app\dianli\validate;

use think\Validate;

class DianliShoudianValidate extends Validate
{
    protected $rule = [
        'company' => 'require',
        'corporation' => 'require',
        'area' => 'require|number',
        'registered_capital' => 'require|number',
        'publicity' => 'require',
        'email' => 'email|unique:shoudian',
        'phone' => 'unique:shoudian',
    ];

    protected $message = [
        'company.require' => '公司名称不能为空',
        'corporation.require' => '法人不能为空',
        'area.require' => '注册地区不能为空',
        'area.number' => '注册地区错误',
        'registered_capital.require' => '注册资金不能为空',
        'registered_capital.number' => '注册资金错误',
        'publicity.require' => '公示情况不能为空',
        'email.email' => '邮箱格式错误',
        'email.unique' => '邮箱不能重复',
        'phone.unique' => '手机号不能重复',
    ];
}